2.1.1 Get the actual GPS position
The .in file
Attributes in [Head] section:
Type: 1
Allowed Mode: 0 (try once), 1 (try until success), 2 (loop)
Allowed Blocking: 0 (non blocking), 1 (blocking)
Attributes in [GPS] section:
No attributes needed
Example .in file: This request gets the actual GPS position in a loop
[Head]
Type=1
Mode=2
Blocking=0
|
The .out file
Attributes in [GPS] section:
- GPSResult: Result code
| GPSResult | Description |
| -2 | GPS not available |
| -1 | No fix |
| 1 | GPS signal ok |
- GPSResultDesc: A textual description of GPSResult
- PositionGeodecimal: The actual GPS position in geographical notation
- PositionMercator: The actual GPS position in mercator notation
- Longitude: The longitude of the actual GPS position (in degrees * 1000000)
- Latitude: The latitude of the actual GPS position (in degrees * 1000000)
- Course: The actual direction
- Speed: The actual speed
- Satellites: Number of satellites used for GPS
- Altitude: The actual altitude in meters
- SatelliteTime: The actual time (hh:mm:ss) given by the satellites
- TimeSinceLastValidPos: The time span in milliseconds since the last valid GPS position
Attributes in [NavigationInformation] section:
- CurrentStreetName: The name of the street at the actual position
- RoadmatchedPosMercator: The actual roadmatched position in mercator notation
- RoadmatchedPosGeodecimal: The actual roadmatched position in geographical notation
- DistanceToTarget: The distance in meters to the navigation destination
- TimeToTarget: The estimated time in seconds to reach the navigation destination
Note: The [NavigationInformation] section only appears in the .out file when fleet navigator is currently in navigation mode.
Note: The attributes PositionGeodecimal, PositionMercator, Latitude, Longitude, Course and Satellites only appear in the .out file when GPSResult is positive
Note: The attributes Latitude and Longitude contain the same values as PositionGeodecimal. Latitude and Longitude are still there for downward compatibility reasons.
Sample .out file: Resulting .out file from the above .in file
example
[Head]
Type=1
TypeDesc=get gps info
Mode=2
ModeDesc=loop
Blocking=0
BlockingDesc=not blocking
Timestamp=26376156
Id=26300046
Result=1
ResultDesc=success and request kept
ExecuteDuration=156
[GPS]
GPSResult=1
GPSResultDesc=signal ok
Longitude=8431598
Latitude=49008112
PositionGeodecimal=+8.431599,+49.008112
PositionMercator=937551,6269214
Course=274
Speed=27
Satellites=5
Altitude=180
SatelliteTime=15:22:06
TimeSinceLastValidPos=67
[NavigationInformation]
CurrentStreetName=Tullastraße
RoadmatchedPosMercator=937562,6269208
RoadmatchedPosGeodecimal=+8.431698,+49.008071
DistanceToTarget=1117
TimeToTarget=145
|